﻿using Common.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Database.Repositories
{
    public class PlaceRepository : RepositoryBase<Place>
    {
        //private readonly PlaceMapper _placeMapper;

        public PlaceRepository()
        {
            //_placeMapper = new PlaceMapper();
        }

        public PlaceDTO GetById(Guid id)
        {
            var placeEntity = DbContext.PlaceSet.FirstOrDefault(x => x.Id == id);
            if (placeEntity == null)
                return null;

            return Mapper.Map(placeEntity);
        }
    }
}
